<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Basic Window - jQuery EasyUI Demo</title>
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
<link rel="stylesheet" type="text/css" href="../demo.css">
<script type="text/javascript" src="../../jquery.min.js"></script>
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>

</head>
<body>
<h2>Basic Window</h2>
<p>Window can be dragged freely on screen.</p>
<div style="margin: 20px 0;"><a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#w').window('open')">Open</a> <a
	href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#w').window('close')">Close</a></div>

<div id="w" class="easyui-window" title="Basic Window"  
style="width: 700px; height: 500px; padding: 10px;">
	<iframe src="http://localhost:8080/" width="100%" height="100%"></iframe>
</div>


<input id="openwindow" type="button" onclick="openwindow();" value="打开新窗口">
<script>

var url = 'http://localhost:8080/docs/';
var width ='300';
var height = '200';
var title = "新窗口名";


function openwindow(title,url,width,height){
	alert(1);
	var html = '<div id="neww" class="easyui-window" title="'+title+'" style="width: '+width+'px; height: '+height+'px; padding: 10px;"><iframe src="'+url+'" width="100%" height="100%"></iframe></div>';
	$("body").append(html);
	$('#neww').window({
	    width:600,    
	    height:400,    
	    modal:true   
	});  
}
 
openwindow(title,url,width,height); 
 
</script>
</body>
</html>